<% content_for :css do %>
  <%= stylesheet_link_tag 'new_or_edit','installations_show','installations_edit' %>
<% end %>
<div class='form'>
  <div class='top'>
    <div class='title corner'>
      <div><%= being_edited ? "编辑-" : "" %>安装派工单 InstallationForm!</div>      
    </div>
  </div>
  <div class='body'>
    <div id='install_info' class='line'>
      <%= render :partial => 'show_install_info.html',:locals => { :being_edited => being_edited } %>
    </div>
    <div id='buyer_info' class='line'>
      <%= render :partial => 'orders/show_buyer.html',:locals => { :being_edited => false } %>
    </div>            
    <div id="furnitures" class='line'>
      <% @install_item = OrderItem.new :order_id => @install.id %>
      <%= render :partial => 'install_items.html',:locals => { :being_edited => being_edited } %>
    </div>    
    <% if being_edited %>
    <div id="buttons" class='line'>            
      <%= link_to '该单生效',effected_order_url(@install), :method => :put, :title => '设置该单生效，便于下一步进行安装派工或厂家订货' , :class => :bb %>
      <%= link_to '立即作废',order_url(@install), :method => :delete, :class => :bb %>
      <%= link_to '返回', :back, :class => :back %>
    </div>
    <% else %>
    <div id="buttons" class='line'>            
      <%= link_to '返回', :back, :class => :back %>
    </div>
    <% end %>
  </div>
</div>